using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_Controls_vl_left_Kdt_list : System.Web.UI.UserControl
{
    public DataTable catdtt;
    public DataTable catsubdtt;
    public DataTable newsddt = new DataTable();
    public Common _common = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        _common = new Common();
        if (!string.IsNullOrEmpty(Request.Params["id"]) && !string.IsNullOrEmpty(Request.Params["act"]))
        {
            if (Request.Params["act"].ToString().Trim().Equals("del"))
            {
                string _id = _common.TextFormat(Request.Params["id"].ToString());
                _common.execNoneQuery("delete DaoTao_khoa_dao_tao where ma_co_so_dt = '" + _id + "'");
                _common.execNoneQuery("delete DaoTao_co_so_dao_tao where ma_co_so_dt = '" + _id + "'");
            }
        }
        LoadCSDT();
    }
    void LoadCSDT()
    {
        string _sql = "select *, convert(varchar, A.ngay_tao, 103) as ngaytao from DaoTao_co_so_dao_tao as A left join DaoTao_mo_hinh_dao_tao as B on A.ma_mo_hinh_dt = B.ma_mo_hinh_dt order by A.ngay_tao desc";
        DataSet _ds = _common.ExeceuteDataset(_sql);
        rpt_csdt.DataSource = _ds;
        rpt_csdt.DataBind();
        //lbl_total.Text = _ds.Tables[0].Rows.Count.ToString();
    }
}
